/*
 * Selling Partner API for Product Type Definitions
 *
 * The Selling Partner API for Product Type Definitions provides programmatic access to attribute and data requirements for product types in the Amazon catalog. Use this API to return the JSON Schema for a product type that you can then use with other Selling Partner APIs, such as the Selling Partner API for Listings Items, the Selling Partner API for Catalog Items, and the Selling Partner API for Feeds (for JSON-based listing feeds).  For more information, see the [Product Type Definitions API Use Case Guide](doc:product-type-api-use-case-guide).
 *
 * The version of the OpenAPI document: 2020-09-01
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.productTypeDefinitions.v2020_09_01
{
    /// <summary>
    /// An Amazon product type with a definition available.
    /// </summary>
    [DataContract(Name = "ProductType")]
    public partial class ProductType : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ProductType" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ProductType() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ProductType" /> class.
        /// </summary>
        /// <param name="name">The name of the Amazon product type. (required).</param>
        /// <param name="displayName">The human-readable and localized description of the Amazon product type. (required).</param>
        /// <param name="marketplaceIds">The Amazon marketplace identifiers for which the product type definition is available. (required).</param>
        public ProductType(string name = default(string), string displayName = default(string), List<string> marketplaceIds = default(List<string>))
        {
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new ArgumentNullException("name is a required property for ProductType and cannot be null");
            }
            this.Name = name;
            // to ensure "displayName" is required (not null)
            if (displayName == null)
            {
                throw new ArgumentNullException("displayName is a required property for ProductType and cannot be null");
            }
            this.DisplayName = displayName;
            // to ensure "marketplaceIds" is required (not null)
            if (marketplaceIds == null)
            {
                throw new ArgumentNullException("marketplaceIds is a required property for ProductType and cannot be null");
            }
            this.MarketplaceIds = marketplaceIds;
        }

        /// <summary>
        /// The name of the Amazon product type.
        /// </summary>
        /// <value>The name of the Amazon product type.</value>
        [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
        public string Name { get; set; }

        /// <summary>
        /// The human-readable and localized description of the Amazon product type.
        /// </summary>
        /// <value>The human-readable and localized description of the Amazon product type.</value>
        [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = true)]
        public string DisplayName { get; set; }

        /// <summary>
        /// The Amazon marketplace identifiers for which the product type definition is available.
        /// </summary>
        /// <value>The Amazon marketplace identifiers for which the product type definition is available.</value>
        [DataMember(Name = "marketplaceIds", IsRequired = true, EmitDefaultValue = true)]
        public List<string> MarketplaceIds { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class ProductType {\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("  DisplayName: ").Append(DisplayName).Append("\n");
            sb.Append("  MarketplaceIds: ").Append(MarketplaceIds).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
